This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Customers::ExternalCustomerFinder | |
| class CustomerNotFound < StandardError; end | |
| attr_reader :params, :customer | |
| def initialize(params, replace_old_contact: false, create_new_customer: true) | |
| @params = params || {} | |
| @replace_old_contact = replace_old_contact | |
| @create_new_customer = create_new_customer | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Haravan::ActivateChargeService | |
| def initialize(shop:, params:) | |
| @params = params | |
| @shop = shop | |
| @plan = Plan.find_by(id: params[:plan_id]) | |
| end | |
| def call |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # frozen_string_literal: true | |
| class Api::V1::RecurringChargesController < Api::V1::BaseController | |
| before_action :set_ecommerce_api_session | |
| def create | |
| plan = Plan.find_by(id: params[:plan_id]) | |
| if current_shop.ecom_provider == 'Haravan' | |
| service = Haravan::RecurringApplicationChargeService.new(plan: plan, shop: current_shop) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Haravan::RecurringApplicationChargeService | |
| attr_reader :render_hash | |
| def initialize(plan:, shop:) | |
| @plan = plan | |
| @shop = shop | |
| @redirect_url = '' | |
| @session = nil | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Shopify::RecurringApplicationChargeService | |
| attr_reader :render_hash | |
| def initialize(shop:) | |
| @shop = shop | |
| @shop_country = @shop.address.country | |
| @render_hash = {} | |
| end | |
| def call |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useEffect, useState, useCallback } from "react" | |
| import "@shopify/polaris/styles.css"; | |
| import { AppProvider, Card, ResourceList, ResourceItem, TextField, FormLayout, Filters, Page } from '@shopify/polaris'; | |
| import ApolloClient from 'apollo-boost'; | |
| import { gql } from "apollo-boost"; | |
| import { Formik, Form, Field, FieldArray } from 'formik'; | |
| function ArticleTable ({token}) { | |
| const [queryValue, setQueryValue] = useState(null); | |
| const [blogPostList, setblogPostList] = useState([]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # I made this script to convert SVG icons for an iOS app into PNG. | |
| # The script will create icons in 3 sizes for different screen DPIs. | |
| find . -type f -name "*.svg" | while read f | |
| do | |
| echo '---' | |
| FILENAME="${f%.*}" | |
| echo $FILENAME |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { call, put, select } from 'redux-saga/effects'; | |
| import Config from 'react-native-config'; | |
| import { SHOW_SUCCESS_SCREEN, SHOW_ERROR_SCREEN } from '../../actions/statusScreen'; | |
| const bulkParcelUpdate = params => fetch(`${Config.SERVER_URL}/api/v2/agents/parcels`, { | |
| method: 'PATCH', | |
| headers: { | |
| Accept: 'application/json', | |
| 'Content-Type': 'application/json', | |
| Authorization: `Bearer ${params.authToken}`, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const SHOW_ERROR_SCREEN = 'SHOW_ERROR_SCREEN' | |
| export const SHOW_ERROR_SCREEN_WITH_CUSTOM_MESSAGE = 'SHOW_ERROR_SCREEN_WITH_CUSTOM_MESSAGE' | |
| export const HIDE_ERROR_SCREEN = 'HIDE_ERROR_SCREEN' | |
| export const SHOW_SUCCESS_SCREEN = 'SHOW_SUCCESS_SCREEN' | |
| const showErrorScreen = () => ( | |
| { type: SHOW_ERROR_SCREEN } | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { SHOW_ERROR_SCREEN, SHOW_ERROR_SCREEN_WITH_CUSTOM_MESSAGE, HIDE_ERROR_SCREEN, SHOW_SUCCESS_SCREEN } from '../actions/statusScreen'; | |
| const initialState = { | |
| show: false, | |
| errorTitle: '', | |
| errorMessage: '', | |
| success: false | |
| }; |
NewerOlder